The New R Help System
نویسنده
چکیده
Version 2.10.0 of R includes new code for processing ‘.Rd’ help files. There are some changes to what is allowed, and some new capabilities and opportunities. One of the reasons for the success of R is that package authors are required to write documentation in a structured format for all of the functions and datasets that they make visible in their packages. This means users can count on asking for help on a topic "foo" using either the function call help("foo"), or one of the shortcuts: entering ?foo in the console, or finding help through the menu system in one of the graphical user interfaces. The quality of the help is improved by the structured format: the quality assurance tools such as R CMD check can report inconsistencies between the documentation and the code, undocumented objects, and other errors, and it is possible to build indices automatically and do other computations on the text. The original help system was motivated by the help system for S (Becker et al., 1988), and the look of the input files was loosely based on LATEX (Lamport, 1986). Perl (Wall et al., 2000) scripts transformed the input files into formatted text to display in the R console, LATEX input files to be processed into Postscript or PDF documents, and HTML files to be viewed in a web browser. These Perl scripts were hard to maintain, and inconsistencies crept into the system: different output formats could inadvertently contain different content. Moreover, since the scripts could only look for fairly simple patterns, the quality control software had trouble detecting many errors which would slip through and result in rendering errors in the help pages, unknown to the author. At the useR! 2008 meeting in Dortmund, one of us (Murdoch) was convinced to write a full-fledged parser for ‘.Rd’ files. This made it into the 2.9.0 release in April, 2009, but only as part of the quality control system: and many package authors started receiving warning and error messages. Over the summer since then several members of the R Core team (including especially Brian Ripley and Kurt Hornik, as well as the authors of this article) have refined that parser, and written renderers to replace the Perl scripts, so that now all help processing is done in R code. We have also added an HTTP server to R to construct and deliver the help pages to a web browser on demand, rather than relying on static copies of the pages. This article describes the components of the new help system. The Parser In the new help system, the transformation from an ‘.Rd’ file to a ‘.tex’, ‘.html’ or ‘.txt’ file is a two-step process. The parse_Rd() function in the tools package converts the ‘.Rd’ file to an R object with class "Rd" representing its structure, and the renderers convert that to the target form.
منابع مشابه
Design and Implementation of an Intelligent Part of Speech Generator
The aim of this paper is to report on an attempt to design and implement an intelligent system capable of generating the correct part of speech for a given sentence while the sentence is totally new to the system and not stored in any database available to the system. It follows the same steps a normal individual does to provide the correct parts of speech using a natural language processor. It...
متن کاملAdaptive Protection Based on Intelligent Distribution Networks with the Help of Network Factorization in the Presence of Distributed Generation Resources
Factorizing a system is one of the best ways to make a system intelligent. Factorizing the protection system, providing the right connecting agents, and transmitting the information faster and more reliably can improve the performance of a protection system and maintain system reliability against distributed generation resources. This study presents a new method for coordinating network protect...
متن کاملFUZZY INCLUSION LINEAR SYSTEMS
In this manuscript, we introduce a new class of fuzzy problems, namely ``fuzzy inclusion linear systems" and propose a fuzzy solution set for it. Then, we present a theoretical discussion about the relationship between the fuzzy solution set of a fuzzy inclusion linear system and the algebraic solution of a fuzzy linear system. New necessary and sufficient conditions are derived for obtain...
متن کاملSustainable Supplier Selection by a New Hybrid Support Vector-model based on the Cuckoo Optimization Algorithm
For assessing and selecting sustainable suppliers, this study considers a triple-bottom-line approach, including profit, people and planet, and regards business operations, environmental effects along with social responsibilities of the suppliers. Diverse metrics are acquainted with measure execution in these three issues. This study builds up a new hybrid intelligent model, namely COA-LS-SVM, ...
متن کاملMajor depressive disorder: a study based on revised-reinforcement sensitivity theory of personality
Background: Study of personality can help to explanation of pathology in mental disorders. The aim of this study was to examine major depressive disorder (MDD) based on revised- reinforcement sensitivity theory (r-RST). Materials and Methods: Forty-five patients with MDD along with 45 healthy individuals as a control group participated in the present study. Following the informed consent f...
متن کاملTransient Analysis of M/M/R Machining System with Mixed Standbys, Switching Failures, Balking, Reneging and Additional Removable Repairmen
The objective of this paper is to study the M/M/R machine repair queueing system with mixed standbys. The life-time and repair time of units are assumed to be exponentially distributed. Failed units are repaired on FCFS basis. The standbys have switching failure probability q (0≤q≤1). The repair facility of the system consists of R permanent as well as r additional removable repairmen. Due to i...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2010